package com.cskaoyan.mapper.marketMapper;

import com.cskaoyan.bean.marketBean.MarketKeyword;
import com.cskaoyan.bean.marketBean.MarketKeywordExample;
import com.cskaoyan.bean.marketBean.MarketSearchHistory;
import com.cskaoyan.bean.vo.WxglMallManagementControllerVo.KeywordListVo;
import com.cskaoyan.bean.vo.WxglMallManagementControllerVo.SystemPermissions;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketKeywordMapper {
    long countByExample(MarketKeywordExample example);

    int deleteByExample(MarketKeywordExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketKeyword record);

    int insertSelective(MarketKeyword record);

    List<MarketKeyword> selectByExample(MarketKeywordExample example);

    MarketKeyword selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketKeyword record, @Param("example") MarketKeywordExample example);

    int updateByExample(@Param("record") MarketKeyword record, @Param("example") MarketKeywordExample example);

    int updateByPrimaryKeySelective(MarketKeyword record);

    int updateByPrimaryKey(MarketKeyword record);

    List<KeywordListVo> keywordList(MarketKeywordExample example);

    int keywordUpdate(@Param("id") Integer id, @Param("keyword") String keyword, @Param("url") String url, @Param("isDefault") Boolean isDefault, @Param("isHot") Boolean isHot);

    int keywordCreate(@Param("m") MarketKeyword marketKeyword);

    MarketKeyword selectKeywordById(@Param("id") Integer id);

    int keywordDelete(@Param("id") Integer id);

    List<MarketKeyword> selectKeywordIsHost();

    List<MarketSearchHistory> selectAllSearchHistory(@Param("userId") Integer userId);

    List<String> searchHelper(String keyword);

    List<String> selectPermissionByRoleId(@Param("roleId") Integer roleId);


    List<SystemPermissions> selectPermissionByPid(@Param("level1Pid") Integer level1Pid);

    int updateRoleIdByPermission(@Param("permissions") List<String> permissions, @Param("roleId") Integer roleId);

    List<String> selectAllPermission();
}